//
//  LocalizableController.m
//  QinrenManagers
//
//  Created by easaa on 15/6/3.
//  Copyright (c) 2015年 easaa. All rights reserved.
//

#import "LocalizableController.h"

@implementation LocalizableController

static NSBundle *bundle = nil;

+ ( NSBundle * )bundle
{
    return bundle;
}

+(void)initUserLanguage
{
    NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
    
    NSString *string = [def valueForKey:@user];
    　　
    if(string.length == 0){
        　　//获取系统当前语言版本
        　　NSArray* languages = [def objectForKey:@AppleLanguages];
        　　NSString *current = [languages objectAtIndex:0];
        　　string = current;
        　　[def setValue:current forKey:@userLanguage];
        　　[def synchronize];//持久化，不加的话不会保存
        　　}


@end
